home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / opint102.5rc / ADDLOG.PAS next >
Pascal/Delphi Source File  |  1988-12-04  |  2KB  |  55 lines

  1. PROGRAM AddLogFile;
  2.  
  3.   {###########################################################################}
  4.   {#                                                                         #}
  5.   {#  Add Line to an OPUS v 1.03 Log File.                                   #}
  6.   {#                                                                         #}
  7.   {# This source code will be released with OpInt Ver. 1.02 and Later.       #}
  8.   {# This source was intended as an example on how to use OpInt.             #}
  9.   {#                                                                         #}
  10.   {# (C) Bifrost Unlimited, (C) Per Holm - 1988                              #}
  11.   {#                                                                         #}
  12.   {###########################################################################}
  13.  
  14. Uses
  15.   Crt,OpInt;
  16.  
  17. CONST
  18.   Ver = 'V. 1.00';
  19.   DateOfVer = 'Jul 17, 1988';
  20.  
  21. VAR
  22.   i: Integer;
  23.   Subject: STRING[60];
  24.  
  25. PROCEDURE Welcome;
  26.  
  27.   BEGIN { Welcome }
  28.     writeln('Add Log String ',Ver,'  -  Uses OpInt (Opus Interface)');
  29.     writeln;
  30.     writeln('(C) Per Holm, (C) Bifrost Unlimited - ',DateOfVer);
  31.     writeln;
  32.     IF ParamCount<2 THEN
  33.       BEGIN
  34.         Writeln(chr(7),'Illegal Number of Parameters');
  35.         writeln;
  36.         writeln('AddLog [x:][Path]Opus.Log <Comment> [<Comment> [[...]]]');
  37.         writeln;
  38.         Halt(2);
  39.       END;
  40.     Subject:='';
  41.       FOR i:=2 TO ParamCount DO
  42.         Subject:=Subject+ParamStr(i)+' '
  43.   END; { Welcome }
  44.  
  45. BEGIN
  46.   DirectVideo:=False;
  47.   Welcome;
  48.   AddLog(ParamStr(1),'+','DOS  '+Subject);
  49.   IF OpIntERROR>0 THEN
  50.     BEGIN
  51.       writeln(#7,'Error Processing Log File');
  52.       HALT(2);
  53.     END;
  54. END.
  55.